home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / gen_vid / scrbin.com / SCRBIN.DOC < prev    next >
Encoding:
Text File  |  1989-08-20  |  7.8 KB  |  176 lines

  1. SCRBIN.DOC
  2. 8/20/89
  3.  
  4. Documentation for SCRBIN.EXE and DISPLAY.EXE
  5.  
  6. SCRBIN is a program designed to allow you convert ASCII text files 
  7. crated with your word processor to binary files that can be written 
  8. directly to video memory. These files could be used in programs that 
  9. you develop as help screens, data entry forms or any other 
  10. character-based image you need to put on the screen. Accessing video 
  11. memory is faster than using the console writing primitives provided 
  12. by your language (printf in C, writeln in Pascal, PRINT in BASIC), 
  13. and storing the image in a file avoid "hard-wiring" screen text in 
  14. your code and improves reusability. The intended result is that you 
  15. can use your word processor as a primitive screen painter. 
  16.  
  17. I developed this program and its companion utility, DISPLAY, for my 
  18. own use and as an exercise in C, which I am now learning. While I 
  19. spent quite some time debugging it, it has not been thoroughly 
  20. tested and I cannot guarantee your results. SCRBIN and DISPLAY are 
  21. designed to work with monochrome, CGA and EGA video adapters, but I 
  22. have only tested in on a Tandy 1000 TX with a CGA adapter. 
  23.  
  24. SCRBIN and DISPLAY are yours to use and redistribute free of charge. 
  25. The programs are not in the public domain, however. I retain 
  26. copyright to the code, kludges and all, and you must acknowledge my 
  27. authorship in any copies you distribute.
  28.  
  29. *************************** Packing List ****************************
  30.  
  31. SCRBIN.EXE      ASCII-to-binary-image converter.
  32. DISPLAY.EXE     Image-viewing utility.
  33. SCRBIN10.C    Source code for SCRBIN.EXE.
  34. DISPLAY5.C    Source code for DISPLAY.EXE.
  35. SCRBIN.DOC      This documentation text file.
  36. CAL.TXT         Demo ASCII file depicting front panel of calculator.
  37. LEWPIC.TXT      Demo ASCII file depicting copyright notice.
  38. CAL.SCR         Image file created by SCRBIN using CAL.TXT and an
  39.          attribute value of 7.
  40. LEWPIC.SCR      Image file created by SCRBIN using LEWPIC.TXT and an
  41.         attribute value of 110.
  42.  
  43. *************************** Using SCRBIN ****************************
  44.  
  45. 1. Preparing files for SCRBIN.
  46.  
  47. The first step in creating screen image files for your programs is 
  48. to "draw" the image you need on your screen with your word 
  49. processor. You may use any word processor or text editor that will 
  50. produce straight ASCII files. I tested SCRBIN using the line-draw 
  51. features of Word Perfect v. 4.2. 
  52.  
  53. When creating the file, place the characters exactly where you wish 
  54. them to appear on the screen at runtime. SCRBIN and DISPLAY will not 
  55. allow you to specify screen position. 
  56.  
  57. When you convert the file, you will have the opportunity to specify 
  58. an attribute for your screen image. All text must have the same 
  59. attribute, so don't bother making text bold or reverse video.
  60.  
  61. SCRBIN assumes you wish to paint the entire screen, so it is not 
  62. terribly useful for creating partial screens, or windows. Each line 
  63. in the text file may not have more than 80 characters, and the file 
  64. may not have more than 25 lines. SCRBIN will truncate files that are 
  65. longer than 25 lines. If your line length is greater than 80 
  66. characters, SCRBIN will probably not produce satisfactory results. 
  67. If a line contains fewer than 80 characters, SCRBIN pads the line 
  68. out to 80 characters, using blanks with your chosen attribute. If a 
  69. file contains fewer than 25 lines, SCRBIN does not pad the file to 
  70. 25 lines. You should add carriage returns if you wish the bottom of 
  71. your screen image to be blank, but with the chosen attribute.
  72.  
  73. When you are finished, save your text file and exit from the word 
  74. processor.
  75.  
  76. 2. Converting text files to screen (.SCR) files.
  77.  
  78. You must now use SCRBIN to convert the text file to a binary image 
  79. file. SCRBIN simply reads your text file and saves it in another 
  80. file along with an attribute byte. You supply the value for the 
  81. attribute byte on the SCRBIN command line. You may specify only one 
  82. attribute value.
  83.  
  84. The SCRBIN command line takes the form
  85.  
  86.                     SCRBIN filename.ext [attribute]
  87.  
  88. where filename.ext is a normal MS-DOS filename (which may be 
  89. qualified with drive and path designators if necessary) and 
  90. attribute is a non-negative integer less than or equal to 255. You 
  91. must precede the attribute parameter with a space. The attribute 
  92. parameter is optional; if you do not supply it, SCRBIN will assume 
  93. you want to use the normal text attribute (a value of 7).
  94.  
  95. The file produced by SCRBIN is given the same base name as your text 
  96. file. SCRBIN adds the extension SCR. If you have a file by that name 
  97. in the current directory, it will be overwritten without warning.
  98.  
  99. 3. Displaying the image (.SCR) file with DISPLAY.
  100.  
  101. I have included the DISPLAY utility to allow you to view the image 
  102. file produced by SCRBIN. To view an image file, type a command line 
  103. of the form
  104.  
  105.                     DISPLAY filename.ext
  106.  
  107. where filename.ext is any MS-DOS filename. Note that SCRBIN produces 
  108. image files with the extension SCR, but you may rename these files 
  109. as you wish; DISPLAY doesn't care about the extension. 
  110.  
  111. DISPLAY reads the image file into a buffer, and copies the buffer to 
  112. video memory. It automatically determines what kind of video card 
  113. you are using. The use of the buffer is redundant, but I included 
  114. that step because you may want to use the code to read several image 
  115. files into buffers at the beginning of your program, and then copy 
  116. the individual buffers to video memory later. This concentrates all 
  117. the disk access in an initial setup stage.
  118.  
  119. The image will remain on your screen until you press any key. 
  120. DISPLAY will then clear the screen and exit.
  121.  
  122.  
  123. I hope you find this useful. Enjoy.
  124.  
  125.  
  126. Lewis Knox
  127. CIS 76164,144
  128.  
  129.  
  130.          ----------------end-of-author's-documentation---------------
  131.  
  132.                          Software Library Information:
  133.  
  134.                     This disk copy provided as a service of
  135.  
  136.                            Public (software) Library
  137.  
  138.          We are not the authors of this program, nor are we associated
  139.          with the author in any way other than as a distributor of the
  140.          program in accordance with the author's terms of distribution.
  141.  
  142.          Please direct shareware payments and specific questions about
  143.          this program to the author of the program, whose name appears
  144.          elsewhere in  this documentation. If you have trouble getting
  145.          in touch with the author,  we will do whatever we can to help
  146.          you with your questions. All programs have been tested and do
  147.          run.  To report problems,  please use the form that is in the
  148.          file PROBLEM.DOC on many of our disks or in other written for-
  149.          mat with screen printouts, if possible.  PsL cannot debug pro-
  150.          programs over the telephone, though we can answer questions.
  151.  
  152.          Disks in the PsL are updated  monthly,  so if you did not get
  153.          this disk directly from the PsL, you should be aware that the
  154.          files in this set may no longer be the current versions. Also,
  155.          if you got this disk from another vendor and are having prob-
  156.          lems,  be aware that  some files may have become corrupted or
  157.          lost by that vendor. Get a current, working disk from PsL.
  158.  
  159.          For a copy of the latest monthly software library newsletter
  160.          and a list of the 2,000+ disks in the library, call or write
  161.  
  162.                            Public (software) Library
  163.                                P.O.Box 35705 - F
  164.                             Houston, TX 77235-5705
  165.  
  166.                                 1-800-2424-PSL
  167.                                  MC/Visa/AmEx
  168.  
  169.                           Outside of U.S. or in Texas
  170.                           or for general information,
  171.                               Call 1-713-524-6394
  172.  
  173.                           PsL also has an outstanding
  174.                           catalog for the Macintosh.
  175.  
  176.